﻿( function () {
	"use strict";

	WinJS.UI.Pages.define( "/pages/home/home.html", {
		// This function is called whenever a user navigates to this page. It
		// populates the page elements with the app's data.
		ready: function ( element, options ) {
			// TODO: Initialize the page here.

			var navbuttons = document.querySelectorAll( 'a[role=navigation]' );
			for( var i = 0; i < navbuttons.length; i++ ) {
				navbuttons[ i ].onclick = onNavButtonClicked;
			}
		}
	} );

	function onNavButtonClicked( e ) {
		e.preventDefault();
		WinJS.Navigation.navigate( e.target.href );
	}
} )();
